﻿@model sipfe.model.dataAccess.SIPMaeSolicitud
@using Resources;
@{
    Layout = "~/Views/Shared/Layaout/general/_LayoutGeneral.cshtml";
    string clase = @ViewBag.clase;         
}
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.personaJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.autocompleteJS)" ></script> 
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.calendarioJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.validatelJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.unobtrusiveJS)" ></script>
<script type="text/javascript" language="javascript" src="@Url.Content(@properties.mantePersonaJS)"></script>
<script type="text/javascript">
    $(function () {
        calendarioFuturo1('dIniActividad', '1');
        calendarioFuturo1('dFinActividad', '1');
        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNumDocumInst", "#vNombresInst", "/AutoAyuda/ListaEmpresaAuto", "1");
        setAutoAyudaEmpresa("#nIdeInstitucion", "#nIdeCodPaisDocInst", "#nIdeTipoDocumInst", "#vNombresInst", "#vNumDocumInst", "/AutoAyuda/ListaEmpresaAuto", "2");
        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNumDocumSol", "#vNombresSol", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#nIdePersonSolicita", "#nIdeCodPaisDocSol", "#nIdeTipoDocumSol", "#vNombresSol", "#vNumDocumSol", "/AutoAyuda/ListaPersonaAuto", "2");
        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNumDocumVin", "#vNombresVin", "/AutoAyuda/ListaPersonaAuto", "1");
        setAutoAyudaEmpresa("#sipDetVinculoPersona2_nIdePersona", "#nIdeCodPaisDocVin", "#nIdeTipoDocumVin", "#vNombresVin", "#vNumDocumVin", "/AutoAyuda/ListaPersonaAuto", "2");
    });
    
</script>

@*<script>
    $(function() {
        $( "#accordion" )
          .accordion({
              header: "> div > h3",
              collapsible: true,
              active : false,
              activate: function (e, ui) {
                  $url = $(ui.newHeader[0]).children('a').attr('href');
                  $.get($url, function (data) {
                      $(ui.newHeader[0]).next().html(data);
                  });
              }
          })
          .sortable({
              axis: "y",
              handle: "h3",
              stop: function( event, ui ) {
                  // IE doesn't register the blur when sorting
                  // so trigger focusout handlers to remove .ui-state-focus
                  ui.item.children( "h3" ).triggerHandler( "focusout" );
              }
          });
    });
  </script>*@

<script type="text/javascript" language="javascript" src="@Url.Content(@properties.nuevoJS)" ></script>
<div id="dialog-modal" title="INGRESE LOS CAMPOS OBLIGATORIOS"></div>


@*<div id="accordion">
  <div class="group">
    <h3><a href="/Nuevo/Nuevo/ajaxEjm">Section lcr</a></h3>   
    <div><img src="@Url.Content("~/images/ajax.gif")"/></div>
  </div>
  <div class="group">
    <h3><a href="/Nuevo/Nuevo/ajaxEjm">Section 2222</a></h3>
     <div><img src="@Url.Content("~/images/ajax.gif")"/></div>
  </div>
  <div class="group">
    <h3><a href="/Nuevo/Nuevo/ajaxEjm">Section 333</a></h3>
     <div><img src="@Url.Content("~/images/ajax.gif")"/></div>
  </div>
  <div class="group">
    <h3><a href="/Nuevo/Nuevo/ajaxEjm">Section 444</a></h3>
    <div><img src="@Url.Content("~/images/ajax.gif")"/></div>
  </div>
</div>*@

<center>
     @using (Html.BeginForm("AddNuevaSolcitud", "Nuevo", FormMethod.Post))
     {         
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" class="tituloWhite8">
        <tr>
            <td style="width:15%">&nbsp;</td>
            <td style="width:25%" align="left">Clase de Solicitud:
              @Html.DropDownList("nIdeClaseSolicitud", (IEnumerable<SelectListItem>)ViewBag.Clase_Tramite)
            </td>
            <td style="width:60%" align="right">@ViewBag.TITULO</td>
        </tr>
    </table>    
 <br />
   @Html.ValidationSummary(false, "Los Siguientes Campos son Obligatorios:")
   <fieldset style="width: 800px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA ENTIDAD FINANCIADORA / GESTIONADORA</legend>
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>
                <tr>
                    <td>
                        @Html.DropDownList("nIdeEmpresa", (IEnumerable<SelectListItem>)ViewBag.EmpresaPabe, "--Seleccione--")
                    </td>
                </tr>
            </tbody>
        </table>
    </fieldset> 
    <br/>
         <fieldset style="width: 800px;" class="fieldsetStyle1">
        <legend class="tituloBlue9">DATOS DE LA SOLICITUD</legend>        
        <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0">
            <tbody>                
                <tr>
                    <td>
                        <table border="0" cellpadding="1" cellspacing="0" width="100%">
                        <tbody class="tituloCelesteN8">                            
                            <tr>
                                <td>País Emisor<span class="asterisco">(*)</span></td>
                                <td>Tipo documento<span class="asterisco">(*)</span></td>
                                <td>Número documento<span class="asterisco">(*)</span></td>
                                <td colspan ="3" align="left">Nombre de la Institución donde Cursará el Programa<span class="asterisco">(*)</span></td>                                
                            </tr>
                            <tr>
                               
                                <td>
                                    @Html.DropDownList("nIdeCodPaisDocInst", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeTipoDocumInst", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")
                                </td>
                                <td>
                                    @Html.TextBox("vNumDocumInst", null, new { style = "width:100px;", maxlength = 120 })
                                </td>
                                <td colspan ="3" align="left">
                                    @Html.TextBox("vNombresInst", null, new { style = "width:300px;", maxlength = 120 })
                                </td>
                            </tr>
                            <tr>
                                <td>Nivel de Estudio<span class="asterisco">(*)</span></td>
                                <td>Concepto/Especialidad<span class="asterisco">(*)</span></td>
                                <td>Modalidad Estudio<span class="asterisco">(*)</span></td>                                
                                <td align="left">Inicio Actividad<span class="asterisco">(*)</span></td>
                                <td>Fin Actividad<span class="asterisco">(*)</span></td>
                                <td>Duración Actividad<span class="asterisco">(*)</span></td>  
                            </tr>
                            <tr>                                
                                <td>
                                    @Html.HiddenFor(model => model.nIdeInstitucion)
                                    @Html.DropDownList("nIdeNivelEstudio", (IEnumerable<SelectListItem>)ViewBag.NivelEstudio, "--Seleccione--", new { onchange = "javascript:cargaConcepto(this,'1');" })
                                </td>
                                <td>
                                    <div id="divConcepto">
                                        <select id="nIdeConcepto" name="nIdeConcepto" style="width:200px;" >
                                            <option value="">--Seleccione--</option>
                                        </select>
                                    </div>
                                </td>
                                <td>
                                    @Html.DropDownList("nIdeModEstudio", (IEnumerable<SelectListItem>)ViewBag.ModalidadEstudio, "--Seleccione--", new { onchange = "javascript:verificaConvocatoriaExiste(this,'1');" })
                                </td>                                
                                <td align="left">
                                    @Html.TextBoxFor(model => model.dIniActividad, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })
                                </td>
                                <td>
                                    @Html.TextBoxFor(model => model.dFinActividad, new { style = "width:60px;", maxlength = 10, onkeyup="javascript:setFechaCaja(this);", onkeypress = "return validarCharFecha(event);", onblur="javascript:ValDateTextNew(this);" })
                                </td>
                                <td>
                                    <table cellpadding="0" cellspacing="0" >
                                        <tr>
                                            <td>@Html.TextBoxFor(model => model.nAnioAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Año(s)</td>
                                            <td>&nbsp;</td>
                                            <td>@Html.TextBoxFor(model => model.nMesAct, new { style = "width:20px;", maxlength = 2 })</td>
                                            <td>Mes(es)</td>
                                        </tr>
                                    </table>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    </td>
                </tr>
                <tr><td><div id="divDatosConvo"></div></td></tr>
            </tbody>
        </table>
    </fieldset>
     <br />
      <fieldset style="width: 800px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">DATOS DEL SOLICITANTE O COLABORADOR</legend>
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
    <tbody class="tituloCelesteN8">
            <tr align="center">
                <td>País Emisor<span class="asterisco">(*)</span></td>
                <td>Tipo documento<span class="asterisco">(*)</span></td>
                <td>Número documento<span class="asterisco">(*)</span></td>
                <td>Nombre del Solicitante<span class="asterisco">(*)</span></td>
                <td>Editar</td>
                <td>&nbsp;</td>
                <td>Nuevo</td>
            </tr>
            <tr align="center">
                <td>@Html.DropDownList("nIdeCodPaisDocSol", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)</td>
                <td>@Html.DropDownList("nIdeTipoDocumSol", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")</td>
                <td>@Html.TextBox("vNumDocumSol", null, new { style = "width:100px;", maxlength = 10 })</td>
                <td>@Html.TextBox("vNombresSol", null, new { style = "width:350px;", maxlength = 120 })@Html.HiddenFor(model => model.nIdePersonSolicita)</td>
                <td><img src="@Url.Content("~/images/editar.png")" class="lupita2" alt="EDITAR PERSONA" onclick="javascript:editarDatosPersonaMante(this,'','1');" /></td>
                <td>&nbsp;</td>
                <td><img src="@Url.Content("~/images/newPerson.jpg")" class="lupita2"  alt="AGREGAR PERSONA" onclick="javascript: regPersonaNaturalPop('1',this);" /></td>
            </tr>
    </tbody>
    </table>
</fieldset> 
  <br />    
<fieldset style="width: 800px;" class="fieldsetStyle1">
    <legend class="tituloBlue9">DATOS DE POSTULANTES</legend>
    <table border="0" style="width: 100%;" cellpadding="0" cellspacing="0" id="tablaVinculos">
    <tbody class="tituloCelesteN8">
            <tr align="center">
                <td>Vínculo</td>
                <td>País Emisor</td>
                <td>Tipo documento</td>
                <td>Número documento</td>
                <td>Nombre de la Referencia Personal</td>
                <td>Editar</td>
                <td>Nuevo</td>                
                <td>Más</td>
            </tr>
            <tr align="center">
                <td>
                    @Html.DropDownList("nIdeTipoVinculo", (IEnumerable<SelectListItem>)ViewBag.ParentescoFamiliar, "--Seleccione--")
                    
                </td>
                <td>
                    @Html.DropDownList("nIdeCodPaisDocVin", (IEnumerable<SelectListItem>)ViewBag.PaisEmisor)
                </td>
                <td>
                    @Html.DropDownList("nIdeTipoDocumVin", (IEnumerable<SelectListItem>)ViewBag.TipoDocIdent, "--Seleccione--")
                </td>
                <td>
                    @Html.TextBox("vNumDocumVin", null, new { style = "width:80px;", maxlength = 120 })
                </td>
                <td>
                    @Html.TextBox("vNombresVin", null, new { style = "width:200px;", maxlength = 120 })                                        
                     @Html.HiddenFor(model => model.sipDetVinculoPersona2.nIdePersona)
                </td>
                <td><img src="@Url.Content("~/images/editar.png")" class="lupita2"  onclick="javascript:editarDatosPersonaMante(this,'','1');" /></td>
                <td><img src="@Url.Content("~/images/newPerson.jpg")" class="lupita2" onclick="javascript: regPersonaNaturalPop('2',this);" /></td>                                          
                <td id="tdOculta">
                    <img src="@Url.Content("~/images/borrar.gif")" class="lupita2" alt="ELIMINAR" id="imgBorrar" style="display:none" onclick="javascript:deleteObjetoForma1(this,4,2);"   />
                    <img src="@Url.Content("~/images/mas.gif")" class="lupita2" alt="AGREGAR"  id="imgAgregar" onclick="javascript:clonarTrObjetoPersona(this,'tdImgPersona','7',4);"/>
                </td>
            </tr>
    </tbody>
    </table>
</fieldset>
     <table border="0" cellpadding="10" cellspacing="0" style="width:72%;">
        <tr align="center">
            <td width="20%"><b>Campo Obligatorio:</b>&nbsp;<span class="asterisco">(*)</span></td>
            <td width="80%"><input type="button" value="Registrar Solicitud" onclick="javascript: addNuevaSolicitudFinal(this.form,'@clase');"  /></td>
        </tr>
    </table>
        
        @Html.HiddenFor(model => model.nIdeDepSolicitud, new { Value = @Session["nIdeDep"] })
        @Html.HiddenFor(model => model.nTipoSolicitud, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeEstadoSol, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdeUsuReg, new { Value = @Session["nIdeUsuario"] })
        @Html.HiddenFor(model => model.nIdeFuncionario, new { Value = @Session["nIdeFuncionario"] })
        @Html.HiddenFor(model => model.nIdeOrigenSol, new { @Value = 1 })

        @Html.HiddenFor(model => model.nIdePrioridad, new { @Value = 1 })
        @Html.HiddenFor(model => model.nIdePlazo, new { @Value = 1 })     
          
        @Html.HiddenFor(model => model.vAsunto, new { @Value = "SOLICITUD DE BECA PABE" }) 
     }        
</center>
